import Vue from 'vue'
import App from './App.vue'
import router from './router'
// element-ui 按需导入(打包体积更小)
import './components/element-ui'

// 完整引入，main.js写入以下代码
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'

import instance from './utils/http'

import GeekChannel from './components/geek-channel.vue'

Vue.config.productionTip = false
// Vue.use(ElementUI)

// 把instance挂载到vue原型上  ，每个vue组件都是vue的实例
Vue.prototype.$http = instance

// 通过 Vue.component 全局注册组件
Vue.component(GeekChannel.name, GeekChannel)

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
